#include "positionpointeritem.h"

#include <QPainter>
#include <QGraphicsScene>

#include <QDebug>

PositionPointerItem::PositionPointerItem(QGraphicsItem* parent)
    : QGraphicsObject(parent)
{
}

QRectF PositionPointerItem::boundingRect() const
{
    return QRectF(-OuterCircleDiameter / 2, -OuterCircleDiameter / 2, OuterCircleDiameter, OuterCircleDiameter);
}

void PositionPointerItem::paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget)
{
    painter->setRenderHint(QPainter::Antialiasing);
    painter->setBrush(QBrush(QColor(Qt::white)));
    painter->drawEllipse(boundingRect());
    painter->setBrush(QBrush(QColor(Qt::gray)));
    painter->drawEllipse(-InnerCircleDiameter / 2, -InnerCircleDiameter / 2, InnerCircleDiameter, InnerCircleDiameter);
}
